<?php

Raise::load('core.RaiseKeyValuePair');

/**
 * TestCoreRaiseKeyValuePair class
 * Testing unit of 'phpraise/core/RaiseKeyValuePair.php'
 *
 * @author Sam-Mauris Yong <hellclanner at live dot com>
 * @license http://www.opensource.org/licenses/bsd-license New BSD License
 * @package Raise.UnitTest.Test
 */
class TestCoreRaiseKeyValuePair extends RaiseTest {

    public static function testClass(){
        self::assertClassExists('RaiseKeyValuePair');
        self::assertClassExtends('RaiseKeyValuePair', 'RaiseDataType');

        $pair = new RaiseKeyValuePair('testKey', array('testValue'));
        self::assertObjectClass($pair, 'RaiseKeyValuePair');

        self::assertStrictEqual($pair->key(), 'testKey');
        self::assertType($pair->value(), 'array');

        $pair->key('testKey2');
        self::assertStrictEqual($pair->key(), 'testKey2');
        self::assertType($pair->value(new MockGenericObject()), 'object');
    }

}

